package com.itheima.service;

import com.itheima.entity.PageResult;
import com.itheima.entity.QueryPageBean;
import com.itheima.pojo.Role;
import com.itheima.pojo.User;

import java.util.List;

public interface UserService {
    /**
     * 根据用户名查询此用户的所有信息
     * @param username
     * @return
     */
    User findByUsername(String username);

    PageResult findAll(QueryPageBean queryPageBean);

    void saveUser(int[] roleIds, User user);

    List<Role> findAllNoPagination();

    User selectUserById(int id);

    Integer[] selectMiddleById(int id);

    void updateUser(int[] roleIds, User user);

    void deleteUserById(int id);
}
